package com.zx.pm.modules.zx.web;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.zx.pm.common.web.BaseController;
import com.zx.pm.modules.zx.entity.Lzd;
import com.zx.pm.modules.zx.entity.ProTimeNode;
import com.zx.pm.modules.zx.service.LzdService;

@Controller
@RequestMapping(value = "${adminPath}/zx/gtasks")
public class GtasksController extends BaseController{

	@Autowired
	private LzdService lzdService;
	
	@RequestMapping(value = {"list", ""})
	public String list(HttpServletRequest request, HttpServletResponse response, Model model) {
		// 投标保证金
		List<ProTimeNode> list1 = lzdService.getBidSecurityDateLzd();
		// 待审核标书
		List<Lzd> list2 = lzdService.getNotAuditLzd();
		// 标书发售截止提醒
		List<ProTimeNode> list3 = lzdService.getTenderSaleDateLzd();
		// 开标时间提醒
		List<ProTimeNode> list4 = lzdService.getTenderOpenDateLzd();
		// 查询废标项目
		List<Lzd> list5 = lzdService.getInvalidLzd();
		// 开标项目时限
		List<Lzd> list6 = lzdService.getTimeLimitLzd();
		
		model.addAttribute("list1", list1);
		model.addAttribute("list2", list2);
		model.addAttribute("list3", list3);
		model.addAttribute("list4", list4);
		model.addAttribute("list5", list5);
		model.addAttribute("list6", list6);
		return "modules/zx/gtasksList";
	}
}
